<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="keywords" content="">
		<meta name="description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta name="apple-mobile-web-app-status-bar-style" content="wrw">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<title>充值</title>
		<link rel="stylesheet" href="${ctxStatic}/jiu/css/public.css?v=1">
		<link rel="stylesheet" href="${ctxStatic}/jiu/css/chongzhi.css">
		<link rel="stylesheet" href="${ctxStatic}/jiu/css/weui.min.css" />
		<script type="text/javascript" src="${ctxStatic}/jiu/js/jquery-2.0.3.min.js"></script>
		<script>
			$(function() {
				$(".chzh_list li").click(function() {
					$(".chzh_list li").removeClass("chzh_active");
					$(this).addClass("chzh_active");
				})
			})
		</script>
		
		<style>
				.weui-cells_checkbox .weui-icon-checked:before {
			    content: "\EA01";
			    color: #c9c9c9;
			    font-size: 28px;
			    display: block;
			}
		</style>
		
	</head>

	<body style="background-color: #F2F2F2;">
		<div style="background-color: #FFFFFF;">
			<p style="padding:10px 5px;font-size:18px;color:red;">注:微信支付收取0.6%手续费，非信用卡消费请选择线下充值。</p>
			<ul class="chzh_list">
			
				
				<c:forEach items="${jiuRechargeConfigList}" var="jiuRechargeConfig" varStatus="vstatus">
					<li id="c${vstatus.index}" onclick="ff(${jiuRechargeConfig.id})" class="${vstatus.index eq 0?'chzh_active':''}">
						<div style="line-height: 22px;">
						   
						   ￥<fmt:formatNumber value="${jiuRechargeConfig.money}" pattern="0.00"/>
						   </br>${jiuRechargeConfig.point}积分
						</div>
					</li>
				</c:forEach>
				
				
				<!--  <li>
          <input type="text" value="其他金额" style="text-align: center; width: 80px;margin: 10px auto;" />
        </li> -->
			</ul>
		</div>
		<%-- <div class="zhifu_pay">
			<p style="">支付方式</p>
			<div style="padding: 10px;">
				<span>
          <img src="${ctxStatic}/jiu/img/wechat.png" width="30px">
        </span>
				<span class="icon_zhifu" style="line-height: 30px;">微信支付</span>
				 <span class="zhifu_checkbox">
		          <input type="radio" name="zhifu" value="1" checked="checked"/>
		        </span> 
			</div>
		</div>
		
		<div class="zhifu_pay">
			<div style="padding: 10px;">
				<span>
          <img src="${ctxStatic}/jiu/img/xianxia.png" width="30px">
        </span>
				<span class="icon_zhifu" style="line-height: 30px;">线下付款</span>
				 <span class="zhifu_checkbox">
		          <input type="radio" name="zhifu" value="0"/>
		        </span> 
			</div>
		</div> --%>
		<div class="zhifu_pay">
			<p style="">支付方式</p>
			<div style="padding: 10px;float: left;" >
				<span>
		          <img src="${ctxStatic}/jiu/img/wechat.png" width="30px">
		        </span>
				<span class="icon_zhifu" style="line-height: 30px;">微信支付</span>					
			</div>
			<div class="weui-cells_checkbox" style="float: right;padding-top: 15px;">
		        <label class="weui-check__label" for="s11">
		          <div class="weui-cell__hd">
		            <input type="radio" class="weui-check" name="zhifu" id="s11" checked="checked" value="1">
		            <i class="weui-icon-checked"></i>
		          </div>		          
		        </label>
        	</div>
        	<div style="clear: both;border-bottom: 1px solid #dfdfdd;"></div>
        	
        	
        	<div style="padding: 10px;float: left;" >
				<span>
		          <img src="${ctxStatic}/jiu/img/xianxia.png" width="30px">
		        </span>
				<span class="icon_zhifu" style="line-height: 30px;">线下付款</span>			
			</div>
			<div class="weui-cells_checkbox" style="float: right;padding-top: 15px;">
		        <label class="weui-check__label" for="s">
		          <div class="weui-cell__hd">
		            <input type="radio" class="weui-check" name="zhifu" id="s" value="0">
		            <i class="weui-icon-checked"></i>
		          </div>		          
		        </label>
        	</div>
        	<div style="clear: both;"></div>
        </div>
        	
        	
		<p>
			<button class="tip-btn orange btn_zhifu" style="" onclick="topay()">
	       	 立即充值
	      	</button>
		</p>

		<script>
			var id = "${fRechargeConfigId}";

			function ff(v) {
				id = v;
			}
			
			var tag=0;
			function topay() {
				if(tag==1){
					return;
				}
				tag=1;
				var type=$('input:radio:checked').val();
				window.location.href = "${ctxFront }/jiu/topay?type="+type+"&rechargeConfigId="+id+"&uid=${uid}";
			}
			
			
			/*  $(document).ready(function() {
			    $('input[type=radio][name=zhifu]').change(function() {
			        alert(this.value);
			        
			    });
			}); */
			 
		</script>		
	</body>
</html>